<?php
use yii\helpers\Url;
\backend\assets\PickerAsset::register($this);
?>
<?php $this->beginBlock('content') ?>
<div class="row">
   <div class="col-sm-12">
        <div class="white-box">
            <h3 class="box-title"></h3>
            <div class="row m-b-15">
                <div class="col-sm-10">
                    <form action="">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <div class="input-daterange input-group" id="date-range">
                                        <input type="text" class="form-control" name="date"  rel-type="date" value="<?=Yii::$app->request->get('date', date("Y-m-d"))?>" placeholder="统计日期" autocomplete="off" />
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <input type="text" class="form-control m-r-5" name="key" value="<?=Yii::$app->request->get('key')?>" placeholder="代理商Id">
                            </div>
                            <div class="col-sm-2">
                                <div class="input-group">
                                    <span class="input-group-btn">
                                        <button class="btn btn-info" type="submit">
                                            搜索
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
            <div>非p2p终端数：<?=$total?></div>
            <br>
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>代理名称</th>
                        <th>IP</th>
                        <th>非p2p终端数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($ret as $item): ?>
                    <tr>
                        <td>
                            <?=$item["agentInfo"]["name"]?> [ <?=$item["agent_id"]?> ]
                        </td>
                        <td><?=$item["ip"]?></td>
                        <td><?=$item["num"]?></td>
                    </tr>
                    <?php endforeach ?>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="14" class="footable-visible">
                            <div class="text-right">
                                <?=\common\components\DataHelper::getLinkPager($page)?>
                            </div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $this->endBlock()?>
